package com.hue.springbootmybatis.dao;

import com.hue.springbootmybatis.domain.Page;
import com.hue.springbootmybatis.domain.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author: 姚凤桥
 * @Date: 2022/5/13 21:33
 * @Description:
 */
@Mapper
public interface UserDao {
    @Select("select * from user")
    List<User> getAll();

    @Select("select * from user")
    List<User> list(Page page);

    @Select("select * from user where id = #{id} and name = #{name}")
    User getById(String id,String name);
}
